package com.qfedu.dtboot.controller;

import com.qfedu.dtboot.entity.SysUser;
import com.qfedu.dtboot.service.SysUserService;
import com.qfedu.dtboot.util.R;
import com.qfedu.dtboot.util.ShiroUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 系统用户(SysUser)表控制层
 *
 * @author ykx
 * @since 2022-09-27 13:02:36
 */
@RestController
@RequestMapping("sys/user")
public class SysUserController {
    /**
     * 服务对象
     */
    @Resource
    private SysUserService sysUserService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public SysUser selectOne(Long id) {
        return null;
    }

    @GetMapping("/info")
    public R info(){
        SysUser sysUser = ShiroUtils.getUserEntity();
        return R.ok().put("user",sysUser);
    }

}
